﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="ContractList.aspx.cs" Inherits="Employees_ContractList" %>

<%@ Register Src="../Control/DepartmentDList.ascx" TagName="DepartmentDList" TagPrefix="uc1" %>
<%@ Register Src="../Control/SelUser.ascx" TagName="SelUser" TagPrefix="uc2" %>
<%@ Register Assembly="ZLTextBox" Namespace="BaseText" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Titile" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">

    <script>
        function CgDv(val) {
            if (val.value == "5") {
                document.getElementById("<%=Nor.ClientID %>").style.display = "none";
                document.getElementById("<%=FullYear.ClientID %>").style.display = "block";
            }
            else {
                document.getElementById("<%=Nor.ClientID %>").style.display = "block";
                document.getElementById("<%=FullYear.ClientID %>").style.display = "none";
            }
        }
    </script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="Server">
    <infolight:webdatasource id="Master" runat="server" autoapply="True" webdatasetid="WMaster"
        datamember="ViewContract" cachedataset="True">
    </infolight:webdatasource>
    <table cellpadding="0" cellspacing="5" class="TbSearch">
        <tr>
            <td style="width: 80px;">
                查询类型：
            </td>
            <td>
                <asp:DropDownList ID="ddlStatus" runat="server" onchange="CgDv(this)">
                    <asp:ListItem Value="0">按查询条件</asp:ListItem>
                    <asp:ListItem Value="1">已过期</asp:ListItem>
                    <asp:ListItem Value="5">合同满整年</asp:ListItem>
                    <asp:ListItem Value="2">未签合同人员</asp:ListItem>
                    <asp:ListItem Value="3">本月满合同人员</asp:ListItem>
                    <asp:ListItem Value="4">下月满合同人员</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td style="width: 80px">
                查询时间：&nbsp;
            </td>
            <td colspan="2">
                <div runat="server" id="Nor">
                    <asp:TextBox ID="Accession" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-M-d'})"
                        Width="85px" CssClass="Wdate" /></asp:TextBox> &nbsp;至&nbsp;
                    <asp:TextBox ID="Dimission" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-M-d'})"
                        Width="85px" CssClass="Wdate" /></asp:TextBox>
                    <asp:DropDownList ID="ddlTimeOption" runat="server">
                        <asp:ListItem Value="0">合同开始时间</asp:ListItem>
                        <asp:ListItem Value="1">合同结束时间</asp:ListItem>
                    </asp:DropDownList>
                </div>
                <div runat="server" id="FullYear">
                    <asp:DropDownList ID="FYmonth" runat="server">
                        <asp:ListItem Value="01">1</asp:ListItem>
                        <asp:ListItem Value="02">2</asp:ListItem>
                        <asp:ListItem Value="03">3</asp:ListItem>
                        <asp:ListItem Value="04">4</asp:ListItem>
                        <asp:ListItem Value="05">5</asp:ListItem>
                        <asp:ListItem Value="06">6</asp:ListItem>
                        <asp:ListItem Value="07">7</asp:ListItem>
                        <asp:ListItem Value="08">8</asp:ListItem>
                        <asp:ListItem Value="09">9</asp:ListItem>
                        <asp:ListItem Value="10">10</asp:ListItem>
                        <asp:ListItem Value="11">11</asp:ListItem>
                        <asp:ListItem Value="12">12</asp:ListItem>
                    </asp:DropDownList>
                </div>
            </td>
        </tr>
        <tr>
            <td style="width: 40px">
                部门：
            </td>
            <td>
                <uc1:DepartmentDList ID="Depart" runat="server" />
            </td>
            <td style="width: 40px">
                员工：
            </td>
            <td style="width: 140px">
                <uc2:SelUser ID="SelUser" runat="server" />
            </td>
            <td style="text-align: center;">
                <span class="roundbtn">
                    <asp:LinkButton ID="SearchButton" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;查&nbsp;&nbsp;询&nbsp;&nbsp;&nbsp;&nbsp;"
                        OnClick="Search_Click"></asp:LinkButton>
                </span>
            </td>
        </tr>
    </table>
    <div class="tabsI" runat="server" id="Record">
        <ul>
            <li>
                <asp:LinkButton ID="Search" runat="server" Text="<span> 合 同 查 询 </span>" CssClass="UnHover"
                    OnClick="Search_Click"></asp:LinkButton>
            </li>
            <li>
                <asp:LinkButton ID="AddFunction" runat="server" Text="<span> 合 同 添 加 </span>" CssClass="UnHover"
                    OnClientClick="location.href='ContractDetail.aspx?ItemParam=&redurl=ContractList.aspx?ItemParam=';return false"></asp:LinkButton>
            </li>
            <li runat="server" id="liDownLoad">
                <asp:LinkButton ID="DownLoad" runat="server" Text="<span style='color:#eeff99;'> 列表数据导出 </span>"
                    CssClass="UnHover" OnClick="DownLoad_Click"></asp:LinkButton>
            </li>
        </ul>
    </div>
    <infolight:webgridview id="wgvMaster" runat="server" datasourceid="Master" width="100%"
        aborticonurl="../Image/UIPics/Abort.gif" addiconurl="../Image/UIPics/Add.gif"
        applyiconurl="../Image/UIPics/Apply.gif" canceliconurl="../Image/UIPics/Cancel.gif"
        mouseoveraborticonurl="../Image/UIPics/Abort2.gif" mouseoveraddiconurl="../Image/UIPics/Add2.gif"
        mouseoverapplyiconurl="../Image/UIPics/Apply2.gif" mouseovercanceliconurl="../Image/UIPics/Cancel2.gif"
        mouseoverokiconurl="../Image/UIPics/OK2.gif" mouseoverqueryiconurl="../Image/UIPics/Query2.gif"
        okiconurl="../Image/UIPics/OK.gif" queryiconurl="../Image/UIPics/Query.gif" headerstylewrap="False"
        pagesize="15" onrowdatabound="wgvMaster_RowDataBound" cellpadding="5">
        <navcontrols>
<InfoLight:ControlItem ControlVisible="False" Size="25" 
                    MouseOverImageUrl="../image/uipics/add2.gif" ControlText="add" 
                    ControlName="Add" ControlType="Image" ImageUrl="../image/uipics/add.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="False" Size="25" 
                    MouseOverImageUrl="../image/uipics/ok2.gif" ControlText="Insert" 
                    ControlName="OK" ControlType="Image" ImageUrl="../image/uipics/ok.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="False" Size="25" 
                    MouseOverImageUrl="../image/uipics/cancel2.gif" ControlText="cancel" 
                    ControlName="Cancel" ControlType="Image" ImageUrl="../image/uipics/cancel.gif"></InfoLight:ControlItem>
</navcontrols>
        <columns>
        <asp:TemplateField HeaderText="查看详细">                    
                    <itemstyle horizontalalign="Center"/>
                    <itemtemplate>
                    <asp:ImageButton ID="imb" runat="server" ImageUrl="../Image/UIPics/Select.gif" 
                            CommandName="show" ></asp:ImageButton>
                   </itemtemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ContractId" HeaderText="合同编号" 
                    SortExpression="ContractId" />
                <asp:BoundField DataField="EmployeeID" HeaderText="员工工号" 
                    SortExpression="EmployeeID" />
                <asp:BoundField DataField="EmpName" HeaderText="员工姓名" 
                    SortExpression="EmpName" />
                <asp:BoundField DataField="DepartmentName" HeaderText="部门名称" 
                    SortExpression="DepartmentName" />
                <asp:BoundField DataField="JobName" HeaderText="职位"
                    SortExpression="JobName" />
                <asp:BoundField DataField="Accession" DataFormatString="{0:d}" 
                HeaderText="入职日期" SortExpression="Accession"></asp:BoundField>
                <asp:TemplateField HeaderText="合同开始" SortExpression="Contractbegin">
                    <EditItemTemplate>
                        <InfoLight:WebDateTimePicker ID="wdtViewContractContractbeginE" runat="server" 
                            DateFormat="None" DateTimeType="DateTime" Localize="False" MaxYear="2050" 
                            MinYear="1950" Text='<%# Bind("Contractbegin") %>' ToolTip="Contractbegin" 
                            UseButtonImage="True" Width="100px"></InfoLight:WebDateTimePicker>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <InfoLight:WebDateTimePicker ID="wdtViewContractContractbeginF" runat="server" 
                            DateFormat="None" DateTimeType="DateTime" Localize="False" MaxYear="2050" 
                            MinYear="1950" ToolTip="Contractbegin" UseButtonImage="True" Width="100px"></InfoLight:WebDateTimePicker>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lViewContractContractbegin" runat="server" 
                            Text='<%# Bind("Contractbegin", "{0:d}") %>' ToolTip="Contractbegin"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="合同结束" SortExpression="Contractend">
                    <EditItemTemplate>
                        <InfoLight:WebDateTimePicker ID="wdtViewContractContractendE" runat="server" 
                            DateFormat="None" DateTimeType="DateTime" Localize="False" MaxYear="2050" 
                            MinYear="1950" Text='<%# Bind("Contractend") %>' ToolTip="Contractend" 
                            UseButtonImage="True" Width="100px"></InfoLight:WebDateTimePicker>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <InfoLight:WebDateTimePicker ID="wdtViewContractContractendF" runat="server" 
                            DateFormat="None" DateTimeType="DateTime" Localize="False" MaxYear="2050" 
                            MinYear="1950" ToolTip="Contractend" UseButtonImage="True" Width="100px"></InfoLight:WebDateTimePicker>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lViewContractContractend" runat="server" 
                            Text='<%# Bind("Contractend", "{0:d}") %>' ToolTip="Contractend"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="到期天数">
                    <ItemTemplate>
                        <asp:Label ID="Day" runat="server"></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                 
                <asp:BoundField DataField="Contractinhibit" HeaderText="约束条件" 
                    SortExpression="Contractinhibit" Visible="False" />
</columns>
        <rowstyle horizontalalign="Center"></rowstyle>
        <pagersettings mode="NumericFirstLast" />
        <footerstyle backcolor="#507CD1" forecolor="White" font-bold="True"></footerstyle>
        <rowstyle backcolor="#EFF3FB"></rowstyle>
        <editrowstyle backcolor="#2461BF"></editrowstyle>
        <selectedrowstyle backcolor="#D1DDF1" forecolor="#333333" font-bold="True"></selectedrowstyle>
        <pagerstyle backcolor="LightBlue" forecolor="White" horizontalalign="Center"></pagerstyle>
        <headerstyle backcolor="DeepSkyBlue" forecolor="White" font-bold="True"></headerstyle>
        <alternatingrowstyle backcolor="White" bordercolor="White"></alternatingrowstyle>
    </infolight:webgridview>
</asp:Content>
